/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.rs.manager.impl;

import java.util.Collection;
import java.util.List;

import com.xy.biz.rs.domain.po.ManufactureArchivePO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.rs.domain.bo.ManufactureArchiveBO;
import com.xy.biz.rs.domain.query.ManufactureArchiveQuery;
import com.xy.biz.rs.domain.converter.ManufactureArchiveConverter;
import com.xy.biz.rs.manager.ManufactureArchiveManager;
import com.xy.biz.rs.dao.ManufactureArchiveDao;

/**
 *
 *
 * @author wwj
 * @date 2021-4-19
 */
@Service
public class ManufactureArchiveManagerImpl implements ManufactureArchiveManager {

	@Autowired
	private ManufactureArchiveDao manufactureArchiveDao;

	@Override
	public ManufactureArchivePO saveManufactureArchive(ManufactureArchiveBO manufactureArchiveBO) {
		ManufactureArchivePO manufactureArchivePO = ManufactureArchiveConverter.toPO(manufactureArchiveBO);
		manufactureArchiveDao.saveManufactureArchive(manufactureArchivePO);
		return manufactureArchivePO;
	}

	@Override
	public int saveAllManufactureArchive(Collection<ManufactureArchiveBO> collection) {
		return manufactureArchiveDao.saveAllManufactureArchive(ManufactureArchiveConverter.toPO(collection));
	}

	@Override
	public int updateManufactureArchive(ManufactureArchiveBO manufactureArchiveBO) {
		return manufactureArchiveDao.updateManufactureArchive(ManufactureArchiveConverter.toPO(manufactureArchiveBO));
	}

	@Override
	public int deleteManufactureArchive(Long manufactureArchiveId) {
		return manufactureArchiveDao.deleteManufactureArchive(manufactureArchiveId);
	}

	@Override
	public ManufactureArchiveBO getManufactureArchive(Long manufactureArchiveId) {
		return ManufactureArchiveConverter.fromPO(manufactureArchiveDao.getManufactureArchive(manufactureArchiveId));
	}

	@Override
	public List<ManufactureArchiveBO> listManufactureArchiveById(Collection<Long> collection) {
		return ManufactureArchiveConverter.fromPO(manufactureArchiveDao.listManufactureArchiveById(collection));
	}

	@Override
	public List<ManufactureArchiveBO> listManufactureArchive(ManufactureArchiveQuery query) {
		return ManufactureArchiveConverter.fromPO(manufactureArchiveDao.listManufactureArchive(query));
	}

	@Override
	public int countManufactureArchive(ManufactureArchiveQuery query) {
		return manufactureArchiveDao.countManufactureArchive(query);
	}

}
